import { Rule } from "./types";

export const FormattingRuleList: Rule[] = [
    {
        id: "AnnotationOnSeparateLine",
        descEn: "Multiple annotations should be on a separate line than the annotated declaration; annotations with parameters should each be on separate lines; annotations should be followed by a space",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#annotationonseparateline",
    },
    {
        id: "AnnotationSpacing",
        descEn: "Annotations should be separated by a single line break.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#annotationspacing",
    },
    {
        id: "ArgumentListWrapping",
        descEn: "All arguments should be on the same line, or every argument should be on a separate line.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            },
            {
                param: "maxLineLength",
                descEn: "maximum line length",
                descCn: "",
                defaultValue: 120,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#argumentlistwrapping",
    },
    {
        id: "BlockCommentInitialStarAlignment",
        descEn: "",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#blockcommentinitialstaralignment",
    },
    {
        id: "ChainWrapping",
        descEn: "When wrapping chained calls ., ?. and ?: should be placed on the next line",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#chainwrapping",
    },
    {
        id: "CommentSpacing",
        descEn: "The end of line comment sign // should be preceded and followed by exactly a space.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#commentspacing",
    },
    {
        id: "CommentWrapping",
        descEn: "",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#commentwrapping",
    },
    {
        id: "DiscouragedCommentLocation",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#discouragedcommentlocation",
    },
    {
        id: "EnumEntryNameCase",
        descEn: "Enum entry names should be uppercase underscore-separated names.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#enumentrynamecase",
    },
    {
        id: "Filename",
        descEn: "A file containing only one visible (e.g. non-private) class, and visible declarations related to that class only, should be named according to that element. The same applies if the file does not contain a visible class but exactly one type alias or one object declaration. Otherwise, the PascalCase notation should be used.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#filename",
    },
    {
        id: "FinalNewline",
        descEn: "Ensures consistent usage of a newline at the end of each file.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "insertFinalNewLine",
                descEn: "report absence or presence of a newline",
                descCn: "",
                defaultValue: true,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#finalnewline",
    },
    {
        id: "FunKeywordSpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#funkeywordspacing",
    },
    {
        id: "FunctionReturnTypeSpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#functionreturntypespacing",
    },
    {
        id: "FunctionSignature",
        descEn: "Rewrites the function signature to a single line when possible (e.g. when not exceeding the max_line_length property) or a multiline signature otherwise. In case of function with a body expression, the body expression is placed on the same line as the function signature when not exceeding the max_line_length property.",
        descCn: "",
        active: false,
        debt: "",
        paramList: [
            {
                param: "forceMultilineWhenParameterCountGreaterOrEqualThan",
                descEn: "parameter count means multiline threshold",
                descCn: "",
                defaultValue: 2147483647,
            },
            {
                param: "functionBodyExpressionWrapping",
                descEn: "indentation size",
                descCn: "",
                defaultValue: "default",
            },
            {
                param: "maxLineLength",
                descEn: "maximum line length",
                descCn: "",
                defaultValue: 120,
            },
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#functionsignature",
    },
    {
        id: "FunctionStartOfBodySpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#functionstartofbodyspacing",
    },
    {
        id: "FunctionTypeReferenceSpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#functiontypereferencespacing",
    },
    {
        id: "ImportOrdering",
        descEn: "Ensures that imports are ordered consistently",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "layout",
                descEn: "the import ordering layout",
                descCn: "",
                defaultValue: "*,java.**,javax.**,kotlin.**,^",
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#importordering",
    },
    {
        id: "Indentation",
        descEn: "respects indentSize with no continuation indent",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#indentation",
    },
    {
        id: "KdocWrapping",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#kdocwrapping",
    },
    {
        id: "MaximumLineLength",
        descEn: "This rules overlaps with style>MaxLineLength from the standard rules, make sure to enable just one or keep them aligned. The pro of this rule is that it can auto-correct the issue.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "maxLineLength",
                descEn: "maximum line length",
                descCn: "",
                defaultValue: 120,
            },
            {
                param: "ignoreBackTickedIdentifier",
                descEn: "ignore back ticked identifier",
                descCn: "",
                defaultValue: false,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#maximumlinelength",
    },
    {
        id: "ModifierListSpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#modifierlistspacing",
    },
    {
        id: "ModifierOrdering",
        descEn: "This rules overlaps with style>ModifierOrder from the standard rules, make sure to enable just one. The pro of this rule is that it can auto-correct the issue.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#modifierordering",
    },
    {
        id: "MultiLineIfElse",
        descEn: "Braces required for multiline if/else statements.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#multilineifelse",
    },
    {
        id: "NoBlankLineBeforeRbrace",
        descEn: "No blank lines before }.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#noblanklinebeforerbrace",
    },
    {
        id: "NoBlankLinesInChainedMethodCalls",
        descEn: "No blank lines in chained method calls",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#noblanklinesinchainedmethodcalls",
    },
    {
        id: "NoConsecutiveBlankLines",
        descEn: "No consecutive blank lines",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#noconsecutiveblanklines",
    },
    {
        id: "NoEmptyClassBody",
        descEn: "No empty ({}) class bodies",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#noemptyclassbody",
    },
    {
        id: "NoEmptyFirstLineInMethodBlock",
        descEn: "No leading empty lines in method blocks",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#noemptyfirstlineinmethodblock",
    },
    {
        id: "NoLineBreakAfterElse",
        descEn: "Disallows line breaks after the else keyword if that could lead to confusion",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nolinebreakafterelse",
    },
    {
        id: "NoLineBreakBeforeAssignment",
        descEn: "When a line is broken at an assignment (=) operator the break comes after the symbol.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nolinebreakbeforeassignment",
    },
    {
        id: "NoMultipleSpaces",
        descEn: "Except in indentation and in KDoc's it is not allowed to have multiple consecutive spaces.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nomultiplespaces",
    },
    {
        id: "NoSemicolons",
        descEn: "No semicolons (unless used to separate multiple statements on the same line).",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nosemicolons",
    },
    {
        id: "NoTrailingSpaces",
        descEn: "No trailing whitespaces",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#notrailingspaces",
    },
    {
        id: "NoUnitReturn",
        descEn: "The Unit type is not allowed as return type of a function. returns (fun fn {} instead of fun fn: Unit {})",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nounitreturn",
    },
    {
        id: "NoUnusedImports",
        descEn: "No unused imports",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nounusedimports",
    },
    {
        id: "NoWildcardImports",
        descEn: "No wildcard imports except imports listed in config",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "packagesToUseImportOnDemandProperty",
                descEn: "Defines allowed wildcard imports",
                descCn: "",
                defaultValue: "java.util.*,kotlinx.android.synthetic.**",
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#nowildcardimports",
    },
    {
        id: "NullableTypeSpacing",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#nullabletypespacing",
    },
    {
        id: "PackageName",
        descEn: "",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#packagename",
    },
    {
        id: "ParameterListSpacing",
        descEn: "Consistent spacing inside the parameter list.",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#parameterlistspacing",
    },
    {
        id: "ParameterListWrapping",
        descEn: "When class/function signature doesn't fit on a single line, each parameter must be on a separate line",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "maxLineLength",
                descEn: "maximum line length",
                descCn: "",
                defaultValue: 120,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#parameterlistwrapping",
    },
    {
        id: "SpacingAroundAngleBrackets",
        descEn: "No spaces around angle brackets when used for typing.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundanglebrackets",
    },
    {
        id: "SpacingAroundColon",
        descEn: "Consistent spacing around colon.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundcolon",
    },
    {
        id: "SpacingAroundComma",
        descEn: "Consistent spacing around comma.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundcomma",
    },
    {
        id: "SpacingAroundCurly",
        descEn: "Consistent spacing around curly braces.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundcurly",
    },
    {
        id: "SpacingAroundDot",
        descEn: "Consistent spacing around dots.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingarounddot",
    },
    {
        id: "SpacingAroundDoubleColon",
        descEn: "No spaces around ::.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingarounddoublecolon",
    },
    {
        id: "SpacingAroundKeyword",
        descEn: "Consistent spacing around keywords.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundkeyword",
    },
    {
        id: "SpacingAroundOperators",
        descEn: "Consistent spacing around operators.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundoperators",
    },
    {
        id: "SpacingAroundParens",
        descEn: "Consistent spacing around parenthesis.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundparens",
    },
    {
        id: "SpacingAroundRangeOperator",
        descEn: "Consistent spacing around range operators.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundrangeoperator",
    },
    {
        id: "SpacingAroundUnaryOperator",
        descEn: "",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingaroundunaryoperator",
    },
    {
        id: "SpacingBetweenDeclarationsWithAnnotations",
        descEn: "Declarations with annotations should be separated by a blank line.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingbetweendeclarationswithannotations",
    },
    {
        id: "SpacingBetweenDeclarationsWithComments",
        descEn: "Declarations with comments should be separated by a blank line.",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingbetweendeclarationswithcomments",
    },
    {
        id: "SpacingBetweenFunctionNameAndOpeningParenthesis",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#spacingbetweenfunctionnameandopeningparenthesis",
    },
    {
        id: "StringTemplate",
        descEn: "Consistent string templates ($v instead of ${v}, ${p.v} instead of ${p.v.toString()})",
        descCn: "",
        active: true,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#stringtemplate",
    },
    {
        id: "TrailingCommaOnCallSite",
        descEn: `The default config comes from ktlint and follows these conventions:

        Kotlin coding convention recommends trailing comma encourage the use of trailing commas at the declaration site and leaves it at your discretion for the call site.
        Android Kotlin style guide does not include trailing comma usage yet.`,
        descCn: "",
        active: false,
        debt: "",
        paramList: [
            {
                param: "useTrailingCommaOnCallSite",
                descEn: "Defines whether trailing commas are required (true) or forbidden (false) at call sites",
                descCn: "",
                defaultValue: true,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#trailingcommaoncallsite",
    },
    {
        id: "TrailingCommaOnDeclarationSite",
        descEn: `The default config comes from ktlint and follows these conventions:

        Kotlin coding convention recommends trailing comma encourage the use of trailing commas at the declaration site and leaves it at your discretion for the call site.
        Android Kotlin style guide does not include trailing comma usage yet.`,
        descCn: "",
        active: false,
        debt: "",
        paramList: [
            {
                param: "useTrailingCommaOnDeclarationSite",
                descEn: "Defines whether trailing commas are required (true) or forbidden (false) at declaration sites",
                descCn: "",
                defaultValue: true,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#trailingcommaondeclarationsite",
    },
    {
        id: "TypeArgumentListSpacing",
        descEn: "Spacing before and after the angle brackets of a type argument list.",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#typeargumentlistspacing",
    },
    {
        id: "TypeParameterListSpacing",
        descEn: "Spacing after a type parameter list in function and class declarations.",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#typeparameterlistspacing",
    },
    {
        id: "UnnecessaryParenthesesBeforeTrailingLambda",
        descEn: "",
        descCn: "",
        active: false,
        debt: "",
        paramList: [],
        url: "https://detekt.dev/docs/rules/formatting#unnecessaryparenthesesbeforetrailinglambda",
    },
    {
        id: "Wrapping",
        descEn: "Inserts missing newlines (for example between parentheses of a multi-line function call).",
        descCn: "",
        active: true,
        debt: "",
        paramList: [
            {
                param: "indentSize",
                descEn: "indentation size",
                descCn: "",
                defaultValue: 4,
            }
        ],
        url: "https://detekt.dev/docs/rules/formatting#wrapping",
    },
];